home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows 95 API Bible
/
Windows 95 API Bible 3 Disc Set.iso
/
Win32 API Bible Book 1 of 3
/
CHAPTE21
/
EX8.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-29
|
2KB
|
43 lines
#include <genstub.c>
LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
switch (uMsg)
{
case WM_COMMAND:
switch( LOWORD( wParam ) )
{
case IDM_TEST:
{
STARTUPINFO si;
char szBuffer[255];
static char *szSWNames[11] = { "SW_HIDE",
"SW_NORMAL", "SW_SHOWMINIMIZED","SW_MAXIMIZE",
"SW_SHOWNOACTIVATE", "SW_SHOW", "SW_MINIMIZE",
"SW_SHOWMINNOACTIVE", "SW_SHOWNA", "SW_RESTORE",
"SW_SHOWDEFAULT" };
GetStartupInfo( &si );
wsprintf( szBuffer,
"SW: %s, Pos: (%d,%d), Size: (%d,%d) ",
szSWNames[si.wShowWindow],
si.dwX, si.dwY, si.dwXSize, si.dwYSize );
MessageBox( hWnd, szBuffer, "Startup Info", MB_OK );
}
break;
case IDM_EXIT:
DestroyWindow( hWnd );
break;
break;
}
break;
case WM_DESTROY:
PostQuitMessage( 0 );
break;
default:
return( DefWindowProc( hWnd, uMsg, wParam, lParam ) );
}
return( NULL );
}